import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.awt.event.InputEvent;

abstract class Ham
{
	private Robot robot;

	private Character ch;
	private boolean running;
	private Area startGame;

	public Ham(Character ch) throws Exception
	{
		this.ch = ch;
		running = true;
		startGame = new Area(75,379,368,427);
		robot = new Robot();
	}

	public void send(KeyEvent k)
	{
		robot.keyPress(k.getKeyCode());
	}

	public void moveMouse(int x, int y)
	{
		robot.mouseMove(x,y);
	}

	public void moveClick(int x, int y)
	{
		moveMouse(x,y);
		robot.mousePress(InputEvent.BUTTON1_MASK);
	}

	public void moveClick(Area a)
	{
		int x = (int) Math.random() * (a.getX2() - a.getX1()) + a.getX1();
	}
}